
all : man texi

man : sample.8 sample.1a

sample.8 : sample.def
	autogen -T agman8.tpl sample.def

sample.1a : sample.def
	autogen -T agman1a.tpl sample.def

texi : sample.texi

sample.texi : sample.def sample
	autogen -Taginfo.tpl sample.def

clean :
	rm -f sample.[81tm]* *~ sample.[ch]

sample : sample.c
	$(CC) -DTEST_SAMPLE_OPTS -o $@ $< `autoopts-config cflags ldflags`

sample.c : sample.def
	CLexe=`which columns` export CLexe ; \
	( cat sample.def ; \
	  echo ' main = { main-type = shell-process; };'; \
	) | autogen -b sample

tar : sample.tgz

sample.tgz : clean
	tar czf $@ *tpl* Makefile sample.def
